#ifndef MESSAGE_H_
#define MESSAGE_H_

/*
 * This class implement a packet wrapper for sending data over a network
 */

#include <stdlib.h>

class Message{

private:

	//DATA MEMBERS

	//A pointer to to data being sent
	void* _inMessageData;
	//A reference to the data pointer in order to interface smoothly with other network functions
	void*& _inMessage;

	//FUNCTIONS

	//A function that frees the data _inMessageData points to
	void freeData();

public:

	//FUNCTIONS

	//A constructor for the class
	Message() : _inMessageData(NULL),_inMessage(_inMessageData) {};
	//A destructor for the class
	~Message();
	//A setter function for the data pointer
	void setMessageData(void* data);
	//A getter function to receive a reference to the data pointer
	void*& getMessage();
	//A getter function that returns a pointer to the data itself
	void* getMessageData();

};

#endif /* MESSAGE_H_ */
